﻿using System;
using System.Collections.Generic;

namespace OSC.Base
{
    public class Activity : IActivity
    {
        public bool ActivityTypeSpecified
        {
            get { return m_ActivityTypeSpecified; }
        }

        public IList<IActivityDetail> Details { get; set; }
        public string Id { get; set; }
        public ulong ApplicationId { get; set; }
        public IPerson Owner { get; set; }
        public DateTime PublishDate { get; set; }
        private ActivityTypes m_ActivityType;
        private bool m_ActivityTypeSpecified;
        public ActivityTypes ActivityType
        {
            get { return m_ActivityType; }
            set { m_ActivityType = value;
                m_ActivityTypeSpecified = true;
            }
        }

        public void AddDetail(IActivityDetail detail)
        {
            Details.Add(detail);
        }

        public Activity()
        {
            Details = new List<IActivityDetail>();
            Owner = new Person();
        }
    }
}